<%-- 
    Document   : home
    Created on : Mar 20, 2012, 1:58:42 PM
    Author     : berto
--%>

<%@page import="it.unitn.science.matr155863_148346_145963.bccastestore.items.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Header</title>
    </head>
    <body>
        <div>
            <div id="imageHeader">
                <a href="<%=response.encodeURL(request.getContextPath()+"/contents/public/home.jsp")%>" class="auralNotRead">
                   <img src="<%=request.getContextPath()%>/immagini/themplate/logo.png" id="headImg" alt="logo Bertoldi Casna Casagranda Store"/>
                </a>
            </div>
            <div id="headerText">
                <h1 class="auralNotRead">Aste on line</h1>
                <h2>Sito dedicato alle migliori aste</h2>
            </div>
            <div id="login" >
                <%
                User user=(User)request.getSession().getAttribute("user");
                if(user==null){                 %>
                    <jsp:include page="./login.jsp" flush="true" />
                    <%
                }else{
                    %>
                    <h2><%=user.getUsername()%></h2>
                    <a href="<%=response.encodeURL(request.getContextPath()+"/contents/user/userDetails.jsp")%>">
                                   <h1><%=user.getFirst_name()%> <%=user.getLast_name()%></h1>
                    </a>
                    <a href="<%=request.getContextPath()%>/services/logout" title="logout">Logout</a>
                  <%
                }
                %>
            </div>
            </div>
            <div id="searchbox">
                <jsp:include page="./searchForm.jsp" flush="true" />
            </div>
    </body>
</html>
